package main

import (
	. "web_api_go/apis"
	r "web_api_go/cache"

	"github.com/gin-gonic/gin"
	//m "web_api_go/models"
	//"fmt"
	//"strconv"
)

func main() {
	/*
		conn := r.Pool.Get()
		conn.Do("set", "test", "333")
		err := m.Setdata()
		if err != nil {
			fmt.Println(err)
		}

		m.Getdata()

		key := "testqueue"
		value := "testtasks2"
		m.Lpushdata(key, value)
		i := 0
		for i <= 10 {
			m.Lpushdata(key, strconv.Itoa(i))
			i++
		}

		data, err := m.Lpopdata(key)
		fmt.Println(data)
		/*
			err = m.Setdata2()
			if err != nil {
				fmt.Println(err)
			}
	*/

	defer r.Pool.Close()
	router := gin.Default()
	router.GET("/", IndexApi)
	router.POST("/tasks/:name", PostTasksApi)
	router.Run(":8181")
}
